package com.ngkj.zmfptback.business.service.read.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ngkj.zmfptCommon.common.bean.RentalInfo;
import com.ngkj.zmfptback.business.bean.RentalResponseEntity;
import com.ngkj.zmfptback.business.mapper.read.RentalReadMapper;
import com.ngkj.zmfptback.business.service.read.RentalReadService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

/**
 * @author ChenHN
 * @since 2021/12/31 creation
 **/
@Service
@Transactional(readOnly = true)
public class RentalReadServiceImpl extends ServiceImpl<RentalReadMapper,RentalResponseEntity> implements RentalReadService {

    @Resource
    private RentalReadMapper rentalReadMapper;

    @Override
    public IPage<RentalResponseEntity> getProcessedRentalList(boolean isSp, Page<RentalResponseEntity> page) {
       IPage<RentalResponseEntity> rentalInfoIPage = rentalReadMapper.getNoProcessedRentalList(isSp,page);
       return rentalInfoIPage;
    }

    @Override
    public RentalResponseEntity getRentalInfoByCzfxxlsh(Long czfxxlsh) {
        return rentalReadMapper.getRentalInfoByCzfxxlsh(czfxxlsh);
    }

    @Override
    public Long getfdIdByCzfxxlsh(Long czfxxlsh) {
        return rentalReadMapper.getfdIdByCzfxxlsh(czfxxlsh);
    }
}
